-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-130956: emit AArch64 trampolines only for long jumps #131041
Conversation
Emit the AArch64 trampoline only if the address is more than 27 bits range. Enable the PLT for Linux AArch64: without it no trampolines are emitted at all and symbols are referenced via the GOT.
Tools/jit/_targets.py
Outdated
@@ -507,6 +507,7 @@ def get_target(host: str) -> _COFF | _ELF | _MachO: | |||
# On aarch64 Linux, intrinsics were being emitted and this flag | |||
# was required to disable them. | |||
"-mno-outline-atomics", | |||
"-fplt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed otherwise trampolines are not generated at all and everything is referenced via the GOT. if you prefer, we can have this as separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this seems like this slows Linux down. Let's drop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, removed.
ff2e45d
to
efdef5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks good!
Looks like it's ~0.4% slower on Linux, and ~0.8% faster on macOS (with 20-25% faster startup!). Maybe, given the results, we should roll back the new -fplt
option for Linux? Otherwise, I think this makes sense to land.
Emit the AArch64 trampoline only if the address is more than 27 bits range.
Enable the PLT for Linux AArch64: without it no trampolines are emitted at all and symbols are referenced via the GOT.